package singleton;

public class Main {
    public static void main(String[] args) {
//        Single single1 = new Single();
        Single single1 = Single.getInstance();
        System.out.println(single1.say());
        System.out.println(single1.say());
        System.out.println(single1.say());

//        Single single2 = new Single();
        Single single2 = Single.getInstance();
        System.out.println(single2.say());

        System.out.println(single1==single2);
        System.out.println(single1.equals(single2));

    }
}
